<?php $this->load->view('common/head');?>

		<!-- 头部开始 -->
        <div class="logintop"><img src="/public/images/loginbg.jpg"></div>
        <!-- 头部结束 -->
        <!--内容开始-->
        <div class="content">
        	<div class="loginbig">
        		<div class="logintitle"><img src="/public/images/logintitle.png"></div>
                <form class="form-horizontal margin-top-10" name="login" id="login" action="<?php echo $this->input->server('REQUEST_URI'); ?>" method="post">
                    <input type="text" name="accout" class="name_input" placeholder="输入账号" onfocus="javascript:if(this.value=='输入账号'){this.value='';}" onblur="javascript:if(this.value==''){this.value='输入账号';}" value="<?=$account?>">                
                    <input type="password" name="password" class="passwordinput name_input" placeholder="输入密码" onfocus="javascript:if(this.value=='输入密码'){this.value='';}" onblur="javascript:if(this.value==''){this.value='输入密码';}" value="<?=$password?>">                
                    <button class="button loginbutton" type="submit">登陆</button>
                    <div class="remeber">
                        <div class="check fl">
                            <input type="checkbox" class="remebercheck" name="isRemember" id="isRemember" value="1" <?=$isRemember ? 'checked="checked"' : ''?> /> <i class="checked"><img src="/public/images/checked.png"></i>
                        </div>
                        <div class="fl">记住密码</div>
                    </div>
                </form>
        	</div>
        </div>
        <!--内容结束-->
<script type="text/javascript">
$(function(){
  initValidation();
  <?php if ($isRemember) { ?>
  $(".checked").show();
  <?php } ?>
  $(".check").click(function(){
      $(".checked").toggle();
   });
  var logintop=$(window).width()*394/1440;
  $(".logintop").css("height",logintop);
});
//初始化验证
function initValidation(){
    $('form[name="login"]').find("input,select,textarea").jqBootstrapValidation("destroy");
    $('form[name="login"]').find("input,select,textarea").not("[type=submit]").jqBootstrapValidation({
        preventSubmit:false,
        submitSuccess: function (form, event) {
             event.preventDefault();
             ajaxFormSubmit('login');
             //alert(1)
         },
         submitError: function (form, event, errors) {
           event.preventDefault();
           }
    });
}
</script>
<?php $this->load->view('common/foot');?>